package com.compass.mobile.ui.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.compass.mobile.callback.OnCustomButtonClick
import com.compass.mobile.databinding.LayoutItemCommonBinding
import com.compass.mobile.framework.adapter.BaseBindViewHolder
import com.compass.mobile.framework.adapter.BaseRecyclerViewAdapter
import com.compass.mobile.framework.ext.onClick
import com.compass.mobile.models.CommonBean

/**
 * Description：
 * Date:2024/7/4 14:25
 */
class CommonAdapter : BaseRecyclerViewAdapter<CommonBean, LayoutItemCommonBinding>() {


    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutItemCommonBinding {
        return LayoutItemCommonBinding.inflate(layoutInflater, parent, false)
    }

    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutItemCommonBinding>,
        item: CommonBean?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {
            tvName.text=item.option

        }
    }
}